﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestCard.aspx.cs" Inherits="Maticsoft.Web.Admin.TestCard" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="../js/jquery.js"></script>
     <style type="text/css">
        .style1
        {
            text-align: center;
        }
   table tr td
   {
   	 background-color:White;
        font-size:18px;
        font-weight:300;
             }
         .auto-style2
         {
             text-align: center;
             height: 30px;
         }
         .auto-style3
         {
             height: 30px;
         }
         .auto-style4
         {
             width: 100px; 
             font-size:22px; 
             font-weight:bold;
             text-align: center;
         }
         

        </style>
       <script type="text/javascript">
           (function ($) {
               var printAreaCount = 0;
               $.fn.printArea = function () {
                   var ele = $(this);
                   var idPrefix = "printArea_";
                   removePrintArea(idPrefix + printAreaCount);
                   printAreaCount++;
                   var iframeId = idPrefix + printAreaCount;
                   var iframeStyle = 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;';
                   iframe = document.createElement('IFRAME');
                   $(iframe).attr({
                       style: iframeStyle,
                       id: iframeId
                   });
                   document.body.appendChild(iframe);
                   var doc = iframe.contentWindow.document;
                   $(document).find("link").filter(function () {
                       return $(this).attr("rel").toLowerCase() == "stylesheet";
                   }).each(
                           function () {
                               doc.write('<link type="text/css" rel="stylesheet" href="'
                                       + $(this).attr("href") + '" >');
                           });
                   doc.write('<div class="' + $(ele).attr("class") + '">' + $(ele).html()
                           + '</div>');
                   doc.close();
                   var frameWindow = iframe.contentWindow;
                   frameWindow.close();
                   frameWindow.focus();
                   frameWindow.print();
               }
               var removePrintArea = function (id) {
                   $("iframe#" + id).remove();
               };
           })(jQuery);
           $(function () {
               $("#btnPrint").click(function () { $("#printContent").printArea(); });
           });
           function preview() {
               $("#print").printArea();
           }
    </script>
</head>
<body>
     <form id="form1" runat="server">
    <div > 
        <div >
        
            <input type="button" id="btnPrint" value="打印"/>
        </div>

    </div>
         <div id="printContent">
         <!--startprint-->
         &nbsp;<table align="center"  >
     
             <tr>
                 <td class="auto-style4" >准考证</td>
                 
             </tr>
             <tr>
                 <td class="auto-style4">&nbsp;&nbsp;</td>
                 
             </tr>
           </table>
    <table border="1"  align="center" style=" background-color:#000000;" >
        <tr height="30" >
            <td width="100"  class="style1" >姓名</td>
            <td colspan="3" >            
                <asp:Label ID="lblIndName" runat="server" ></asp:Label>            
            </td>
            <td class="style1"  width="120" rowspan="4">
                <asp:Image ImageUrl ="" ID="img" runat="server" Height="120px" Width="120px" />
            </td>
        </tr>
        <tr height="30">
            <td width="100"  class="style1" >性别</td>
            <td width="100">
                <asp:Label ID="lblIndSex" runat="server" ></asp:Label>
            </td>
            <td width="100"  class="style1" >类别</td>
            <td>
                <asp:Label ID="lblIndNation" runat="server" ></asp:Label>
            </td>
           
        </tr>
        <tr>
            <td width="100"  class="auto-style2" > 身份证号</td>
            <td colspan="3" class="auto-style3">
                <asp:Label ID="lblIndIdnumber" runat="server" ></asp:Label>
            </td>
            
           
        </tr>
        
        <tr height="30">
            <td width="100"  class="style1" >单位名称</td>
            <td colspan="3">
                <asp:Label ID="lblIndWord" runat="server" ></asp:Label>
            </td>
        </tr>
        <tr height="30">
            <td width="100"  class="style1" >考试地址</td>
            <td colspan="4">
                <asp:Label ID="lblIndDivision" runat="server" ></asp:Label>
            </td>  
        </tr>
        <tr height="30">
            <td width="100"  class="style1"  >考场</td>
            <td  colspan="2" >
                <asp:Label ID="lblIndPlace" runat="server"></asp:Label>
            </td>
            <td  class="style1"  >
                考号</td>
            <td  >
                <asp:Label ID="lblkh" runat="server" ></asp:Label>
            </td>
            
        </tr>
        <tr height="30">
            <td width="100"  class="style1"  >考试时间</td>
            <td  colspan="2" >
                <asp:Label ID="lblIndTime" runat="server" ></asp:Label>
            </td>
            <td  class="style1"  >
                座号</td>
            <td  >
                <asp:Label ID="lblsteat" runat="server" ></asp:Label>
            </td>
            
        </tr>
        <tr >
            <td  colspan="5">请带好自己的身份证</td>

        </tr>   

    
    </table>    
         <!--endprint-->
             </div>
    </form>
</body>
</html>
